package com.yr.ryjk.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.yr.ryjk.common.Constant;

public class DateUtil {
	public static String getTodayYMD() {
		SimpleDateFormat sdf = new SimpleDateFormat(Constant.DATE_FORMAT_YEAR);
		return sdf.format(new Date());
	}
	
	public static String getYMDOfDate(Date date) {
		SimpleDateFormat sdf = new SimpleDateFormat(Constant.DATE_FORMAT_YEAR);
		return sdf.format(date);
	}
	
	public static String getFullStrOfDate(Date date) {
		SimpleDateFormat sdf = new SimpleDateFormat(Constant.DATE_FORMAT);
		return sdf.format(date);
	}
}
